//
//  myViewController.m
//  myTabBarController
//
//  Created by 苗钧豪 on 16/7/23.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "myViewController.h"
#import "ViewController.h"
#import "oneViewController.h"
#import "twoViewController.h"
#import "threeViewController.h"
#import "foreViewController.h"
#define WIDTH self.view.bounds.size.width
#define HEIGHT self.view.bounds.size.height
@interface myViewController ()

@end

@implementation myViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *btn1 = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [btn1 setBackgroundImage:[UIImage imageNamed:@"1"] forState:(UIControlStateNormal)];
    btn1.frame = CGRectMake(100 / 3, 10,(WIDTH - 200) / 5, 24);
    [btn1 addTarget:self action:@selector(btn1) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn1];
    
    UIButton *btn2 = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [btn2 setBackgroundImage:[UIImage imageNamed:@"2"] forState:(UIControlStateNormal)];
    btn2.frame = CGRectMake((WIDTH - 200) / 5 + 200 / 3, 10, (WIDTH - 200) / 5, 24);
    [btn2 addTarget:self action:@selector(btn2) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn2];
    
    UIButton *btn3 = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [btn3 setBackgroundImage:[UIImage imageNamed:@"3"] forState:(UIControlStateNormal)];
    btn3.frame = CGRectMake((WIDTH - 200) / 5 * 2 + 300 / 3, 10, (WIDTH - 200) / 5, 24);
    [btn3 addTarget:self action:@selector(btn3) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn3];
    
    UIButton *btn4 = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [btn4 setBackgroundImage:[UIImage imageNamed:@"4"] forState:(UIControlStateNormal)];
    btn4.frame = CGRectMake((WIDTH - 200) / 5 * 3 + 400 / 3, 10, (WIDTH - 200) / 5, 24);
    [btn4 addTarget:self action:@selector(btn4) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn4];
    
    UIButton *btn5 = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [btn5 setBackgroundImage:[UIImage imageNamed:@"5"] forState:(UIControlStateNormal)];
    btn5.frame = CGRectMake((WIDTH - 200) / 5 * 4 + 500 / 3, 10, (WIDTH - 200) / 5, 24);
    [btn5 addTarget:self action:@selector(btn5) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:btn5];
    // Do any additional setup after loading the view.
}
- (void)btn1 {
    [self dismissViewControllerAnimated:NO completion:nil];
    ViewController *vc = [[ViewController alloc]init];
    vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
    [self presentViewController:vc animated:NO completion:nil];

}
- (void)btn2 {
    [self dismissViewControllerAnimated:NO completion:nil];
    oneViewController *vc = [[oneViewController alloc]init];
    vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
    [self presentViewController:vc animated:NO completion:nil];
}
- (void)btn3 {
    [self dismissViewControllerAnimated:NO completion:nil];
    twoViewController *vc = [[twoViewController alloc]init];
    vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
    [self presentViewController:vc animated:NO completion:nil];
}
- (void)btn4 {
    [self dismissViewControllerAnimated:NO completion:nil];
    threeViewController *vc = [[threeViewController alloc]init];
    vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
    [self presentViewController:vc animated:NO completion:nil];
}
- (void)btn5 {
    [self dismissViewControllerAnimated:NO completion:nil];
    foreViewController *vc = [[foreViewController alloc]init];
    vc.modalTransitionStyle = UIModalTransitionStylePartialCurl;
    [self presentViewController:vc animated:NO completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
